package jmine.tec.subscription.impl;

import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;

import jmine.tec.subscription.SubscriptionSettings;

public class BlaPublisher extends AbstractPublisher<BlaPublication> {

    public final AtomicLong ID_GENERATOR = new AtomicLong();

    public BlaPublisher() {
        super(BlaPublication.class);
    }

    public String identification() {
        return "bla";
    }

    public void publishNew() {
        this.publish(newSettings(), new BlaPublication(ID_GENERATOR.getAndIncrement()));
    }

    private SubscriptionSettings newSettings() {
        return this.newSubscriptionSettings(new HashMap<String, Object>());
    }

    public void newPartial() {
        this.publishPartialPublication(newSettings(), new BlaPartialPublication());
    }

    public BlaPublication newPublication(SubscriptionSettings settings) {
        return new BlaPublication(ID_GENERATOR.get());
    }

    public Map<String, Class<?>> subscriptionSettingsParameters() {
        return new HashMap<String, Class<?>>();
    }

}
